package com.framework.admin.model;

import com.framework.common.config.EntityUpdateListener;
import com.framework.common.listener.impl.BaseEntityUpdate;
import lombok.Data;

import javax.persistence.*;


/**
 * @description: 模块数据表字段 model
 * @author: lizurong
 * @version: 1.0
 * @date: 2021-03-24 11:18:24
 */
@Data
@Entity
@Table(name = "sys_module_table_field")
@EntityListeners(EntityUpdateListener.class)
@org.hibernate.annotations.Table(appliesTo = "sys_module_table_field", comment = "模块数据表字段")
public class ModuleTableField  extends BaseEntityUpdate {

	@Column(nullable = false, columnDefinition = "varchar(32) COMMENT '列名' ")
	private String columnName;

	@Column(nullable = false, columnDefinition = "varchar(255) COMMENT '列名描述' ")
	private String columnDesc;

	@Column(nullable = false, columnDefinition = "varchar(32) COMMENT '数据类型' ")
	private String dataType;

	@Column(nullable = false, columnDefinition = "int(5) COMMENT '字段长度' ")
	private Integer columnLength;

	@Column(columnDefinition = "int(11) COMMENT '小数位数' ")
	private Integer point;

	@Column(nullable = false, columnDefinition = "varchar(32) COMMENT '是否为空' ")
	private String ifNull;

	@Column(nullable = false, columnDefinition = "varchar(55) COMMENT '表名' ")
	private String tableName;

	@Transient
	private String tableDesc;

	@Transient
	private String moduleFormId;
}
